3.106 \(\int (f+g x) \sqrt{a+b \log (c (d+e x)^n)} \, dx\)

Optimal. Leaf size=255 \[ -\frac{\sqrt{\pi } \sqrt{b} \sqrt{n} e^{-\frac{a}{b n}} (d+e x) (e f-d g) \left (c (d+e x)^n\right )^{-1/n} \text{Erfi}\left (\frac{\sqrt{a+b \log \left (c (d+e x)^n\right )}}{\sqrt{b} \sqrt{n}}\right )}{2 e^2}-\frac{\sqrt{\frac{\pi }{2}} \sqrt{b} g \sqrt{n} e^{-\frac{2 a}{b n}} (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n} \text{Erfi}\left (\frac{\sqrt{2} \sqrt{a+b \log \left (c (d+e x)^n\right )}}{\sqrt{b} \sqrt{n}}\right )}{4 e^2}+\frac{(d+e x) (e f-d g) \sqrt{a+b \log \left (c (d+e x)^n\right )}}{e^2}+\frac{g (d+e x)^2 \sqrt{a+b \log \left (c (d+e x)^n\right )}}{2 e^2} \]

[Out]

-(Sqrt[b]*(e*f - d*g)*Sqrt[n]*Sqrt[Pi]*(d + e*x)*Erfi[Sqrt[a + b*Log[c*(d + e*x)^n]]/(Sqrt[b]*Sqrt[n])])/(2*e^
2*E^(a/(b*n))*(c*(d + e*x)^n)^n^(-1)) - (Sqrt[b]*g*Sqrt[n]*Sqrt[Pi/2]*(d + e*x)^2*Erfi[(Sqrt[2]*Sqrt[a + b*Log
[c*(d + e*x)^n]])/(Sqrt[b]*Sqrt[n])])/(4*e^2*E^((2*a)/(b*n))*(c*(d + e*x)^n)^(2/n)) + ((e*f - d*g)*(d + e*x)*S
qrt[a + b*Log[c*(d + e*x)^n]])/e^2 + (g*(d + e*x)^2*Sqrt[a + b*Log[c*(d + e*x)^n]])/(2*e^2)

________________________________________________________________________________________

Rubi [A]  time = 0.340551, antiderivative size = 255, normalized size of antiderivative = 1., number of steps used = 12, number of rules used = 9, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.375, Rules used = {2401, 2389, 2296, 2300, 2180, 2204, 2390, 2305, 2310} \[ -\frac{\sqrt{\pi } \sqrt{b} \sqrt{n} e^{-\frac{a}{b n}} (d+e x) (e f-d g) \left (c (d+e x)^n\right )^{-1/n} \text{Erfi}\left (\frac{\sqrt{a+b \log \left (c (d+e x)^n\right )}}{\sqrt{b} \sqrt{n}}\right )}{2 e^2}-\frac{\sqrt{\frac{\pi }{2}} \sqrt{b} g \sqrt{n} e^{-\frac{2 a}{b n}} (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n} \text{Erfi}\left (\frac{\sqrt{2} \sqrt{a+b \log \left (c (d+e x)^n\right )}}{\sqrt{b} \sqrt{n}}\right )}{4 e^2}+\frac{(d+e x) (e f-d g) \sqrt{a+b \log \left (c (d+e x)^n\right )}}{e^2}+\frac{g (d+e x)^2 \sqrt{a+b \log \left (c (d+e x)^n\right )}}{2 e^2} \]

Antiderivative was successfully verified.

[In]

Int[(f + g*x)*Sqrt[a + b*Log[c*(d + e*x)^n]],x]

[Out]

-(Sqrt[b]*(e*f - d*g)*Sqrt[n]*Sqrt[Pi]*(d + e*x)*Erfi[Sqrt[a + b*Log[c*(d + e*x)^n]]/(Sqrt[b]*Sqrt[n])])/(2*e^
2*E^(a/(b*n))*(c*(d + e*x)^n)^n^(-1)) - (Sqrt[b]*g*Sqrt[n]*Sqrt[Pi/2]*(d + e*x)^2*Erfi[(Sqrt[2]*Sqrt[a + b*Log
[c*(d + e*x)^n]])/(Sqrt[b]*Sqrt[n])])/(4*e^2*E^((2*a)/(b*n))*(c*(d + e*x)^n)^(2/n)) + ((e*f - d*g)*(d + e*x)*S
qrt[a + b*Log[c*(d + e*x)^n]])/e^2 + (g*(d + e*x)^2*Sqrt[a + b*Log[c*(d + e*x)^n]])/(2*e^2)

Rule 2401

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Int[Exp
andIntegrand[(f + g*x)^q*(a + b*Log[c*(d + e*x)^n])^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && NeQ[
e*f - d*g, 0] && IGtQ[q, 0]

Rule 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2296

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2300

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_), x_Symbol] :> Dist[x/(n*(c*x^n)^(1/n)), Subst[Int[E^(x/n)*(a +
b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2180

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/Sqrt[(c_.) + (d_.)*(x_)], x_Symbol] :> Dist[2/d, Subst[Int[F^(g*(e - (c*
f)/d) + (f*g*x^2)/d), x], x, Sqrt[c + d*x]], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !$UseGamma === True

Rule 2204

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erfi[(c + d*x)*Rt[b*Log[F], 2
]])/(2*d*Rt[b*Log[F], 2]), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2390

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_.)*(x_))^(q_.), x_Symbol] :> Dist[1/
e, Subst[Int[((f*x)/d)^q*(a + b*Log[c*x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, q}, x]
 && EqQ[e*f - d*g, 0]

Rule 2305

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2310

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_)*((d_.)*(x_))^(m_.), x_Symbol] :> Dist[(d*x)^(m + 1)/(d*n*(c*x^n
)^((m + 1)/n)), Subst[Int[E^(((m + 1)*x)/n)*(a + b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, d, m, n, p}
, x]

Rubi steps

\begin{align*} \int (f+g x) \sqrt{a+b \log \left (c (d+e x)^n\right )} \, dx &=\int \left (\frac{(e f-d g) \sqrt{a+b \log \left (c (d+e x)^n\right )}}{e}+\frac{g (d+e x) \sqrt{a+b \log \left (c (d+e x)^n\right )}}{e}\right ) \, dx\\ &=\frac{g \int (d+e x) \sqrt{a+b \log \left (c (d+e x)^n\right )} \, dx}{e}+\frac{(e f-d g) \int \sqrt{a+b \log \left (c (d+e x)^n\right )} \, dx}{e}\\ &=\frac{g \operatorname{Subst}\left (\int x \sqrt{a+b \log \left (c x^n\right )} \, dx,x,d+e x\right )}{e^2}+\frac{(e f-d g) \operatorname{Subst}\left (\int \sqrt{a+b \log \left (c x^n\right )} \, dx,x,d+e x\right )}{e^2}\\ &=\frac{(e f-d g) (d+e x) \sqrt{a+b \log \left (c (d+e x)^n\right )}}{e^2}+\frac{g (d+e x)^2 \sqrt{a+b \log \left (c (d+e x)^n\right )}}{2 e^2}-\frac{(b g n) \operatorname{Subst}\left (\int \frac{x}{\sqrt{a+b \log \left (c x^n\right )}} \, dx,x,d+e x\right )}{4 e^2}-\frac{(b (e f-d g) n) \operatorname{Subst}\left (\int \frac{1}{\sqrt{a+b \log \left (c x^n\right )}} \, dx,x,d+e x\right )}{2 e^2}\\ &=\frac{(e f-d g) (d+e x) \sqrt{a+b \log \left (c (d+e x)^n\right )}}{e^2}+\frac{g (d+e x)^2 \sqrt{a+b \log \left (c (d+e x)^n\right )}}{2 e^2}-\frac{\left (b g (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n}\right ) \operatorname{Subst}\left (\int \frac{e^{\frac{2 x}{n}}}{\sqrt{a+b x}} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{4 e^2}-\frac{\left (b (e f-d g) (d+e x) \left (c (d+e x)^n\right )^{-1/n}\right ) \operatorname{Subst}\left (\int \frac{e^{\frac{x}{n}}}{\sqrt{a+b x}} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{2 e^2}\\ &=\frac{(e f-d g) (d+e x) \sqrt{a+b \log \left (c (d+e x)^n\right )}}{e^2}+\frac{g (d+e x)^2 \sqrt{a+b \log \left (c (d+e x)^n\right )}}{2 e^2}-\frac{\left (g (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n}\right ) \operatorname{Subst}\left (\int e^{-\frac{2 a}{b n}+\frac{2 x^2}{b n}} \, dx,x,\sqrt{a+b \log \left (c (d+e x)^n\right )}\right )}{2 e^2}-\frac{\left ((e f-d g) (d+e x) \left (c (d+e x)^n\right )^{-1/n}\right ) \operatorname{Subst}\left (\int e^{-\frac{a}{b n}+\frac{x^2}{b n}} \, dx,x,\sqrt{a+b \log \left (c (d+e x)^n\right )}\right )}{e^2}\\ &=-\frac{\sqrt{b} e^{-\frac{a}{b n}} (e f-d g) \sqrt{n} \sqrt{\pi } (d+e x) \left (c (d+e x)^n\right )^{-1/n} \text{erfi}\left (\frac{\sqrt{a+b \log \left (c (d+e x)^n\right )}}{\sqrt{b} \sqrt{n}}\right )}{2 e^2}-\frac{\sqrt{b} e^{-\frac{2 a}{b n}} g \sqrt{n} \sqrt{\frac{\pi }{2}} (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n} \text{erfi}\left (\frac{\sqrt{2} \sqrt{a+b \log \left (c (d+e x)^n\right )}}{\sqrt{b} \sqrt{n}}\right )}{4 e^2}+\frac{(e f-d g) (d+e x) \sqrt{a+b \log \left (c (d+e x)^n\right )}}{e^2}+\frac{g (d+e x)^2 \sqrt{a+b \log \left (c (d+e x)^n\right )}}{2 e^2}\\ \end{align*}

Mathematica [A]  time = 0.286951, size = 235, normalized size = 0.92 \[ -\frac{e^{-\frac{2 a}{b n}} (d+e x) \left (c (d+e x)^n\right )^{-2/n} \left (4 \sqrt{\pi } \sqrt{b} \sqrt{n} e^{\frac{a}{b n}} (e f-d g) \left (c (d+e x)^n\right )^{\frac{1}{n}} \text{Erfi}\left (\frac{\sqrt{a+b \log \left (c (d+e x)^n\right )}}{\sqrt{b} \sqrt{n}}\right )+\sqrt{2 \pi } \sqrt{b} g \sqrt{n} (d+e x) \text{Erfi}\left (\frac{\sqrt{2} \sqrt{a+b \log \left (c (d+e x)^n\right )}}{\sqrt{b} \sqrt{n}}\right )-4 e^{\frac{2 a}{b n}} \left (c (d+e x)^n\right )^{2/n} (-d g+2 e f+e g x) \sqrt{a+b \log \left (c (d+e x)^n\right )}\right )}{8 e^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(f + g*x)*Sqrt[a + b*Log[c*(d + e*x)^n]],x]

[Out]

-((d + e*x)*(4*Sqrt[b]*E^(a/(b*n))*(e*f - d*g)*Sqrt[n]*Sqrt[Pi]*(c*(d + e*x)^n)^n^(-1)*Erfi[Sqrt[a + b*Log[c*(
d + e*x)^n]]/(Sqrt[b]*Sqrt[n])] + Sqrt[b]*g*Sqrt[n]*Sqrt[2*Pi]*(d + e*x)*Erfi[(Sqrt[2]*Sqrt[a + b*Log[c*(d + e
*x)^n]])/(Sqrt[b]*Sqrt[n])] - 4*E^((2*a)/(b*n))*(c*(d + e*x)^n)^(2/n)*(2*e*f - d*g + e*g*x)*Sqrt[a + b*Log[c*(
d + e*x)^n]]))/(8*e^2*E^((2*a)/(b*n))*(c*(d + e*x)^n)^(2/n))

________________________________________________________________________________________

Maple [F]  time = 0.566, size = 0, normalized size = 0. \begin{align*} \int \left ( gx+f \right ) \sqrt{a+b\ln \left ( c \left ( ex+d \right ) ^{n} \right ) }\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*x+f)*(a+b*ln(c*(e*x+d)^n))^(1/2),x)

[Out]

int((g*x+f)*(a+b*ln(c*(e*x+d)^n))^(1/2),x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (g x + f\right )} \sqrt{b \log \left ({\left (e x + d\right )}^{n} c\right ) + a}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)*(a+b*log(c*(e*x+d)^n))^(1/2),x, algorithm="maxima")

[Out]

integrate((g*x + f)*sqrt(b*log((e*x + d)^n*c) + a), x)

________________________________________________________________________________________

Fricas [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: UnboundLocalError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)*(a+b*log(c*(e*x+d)^n))^(1/2),x, algorithm="fricas")

[Out]

Exception raised: UnboundLocalError

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a + b \log{\left (c \left (d + e x\right )^{n} \right )}} \left (f + g x\right )\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)*(a+b*ln(c*(e*x+d)**n))**(1/2),x)

[Out]

Integral(sqrt(a + b*log(c*(d + e*x)**n))*(f + g*x), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (g x + f\right )} \sqrt{b \log \left ({\left (e x + d\right )}^{n} c\right ) + a}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)*(a+b*log(c*(e*x+d)^n))^(1/2),x, algorithm="giac")

[Out]

integrate((g*x + f)*sqrt(b*log((e*x + d)^n*c) + a), x)